<template>
  <div class="search-box">
    <div @click="itemClick(item)" class="search-item" v-for="item in searchValue" :key="item.id">
      {{item.name}}
    </div>
  </div>
</template>

<script>
export default {
  props: {
    searchValue: {
      type: Array,
      default() {
        return []
      }
    }
  },
  methods: {
    itemClick(item) {
      // console.log(item)
      this.$emit('searchClick', item)
    }
  }
}
</script>

<style lang="scss" scoped>
  .search-box {
    background-color: #fff;
    padding: 0px 20px;
    .search-item {
      padding: 10px 0;
    }
  }
</style>